_lastDataSelected = nil;
//DdlFollowList = _this;


_lastHumanNb=0;

while {dialog && !endDialog} do 
{
	scopeName "detectLoop";
	
	//TankPlayer globalChat format["test %1",list trgRespawn];

	
	format["waitUntil %1 != %2",count (list HumanTrg),_lastHumanNb] call debug;

	waitUntil { (count (list HumanTrg) != _lastHumanNb) or (!dialog) or endDialog };

	// no more dialog exit the loop
	if((!dialog) or endDialog) then {
		
		 breakOut "detectLoop";
	};
	
	_lastHumanNb= count (list HumanTrg);

	lbClear IdcDdlFollowList;	

	HumanFollowList=[];
	
	{ // foreach human in the real world

		_human = _x;
		HumanFollowList=HumanFollowList+[_human];
		_index=lbAdd [IdcDdlFollowList,name _human];
		lbSetData [IdcDdlFollowList, _index, _human];
		//TankPlayer addAction [ , "TankHumanPlacement.sqf" , [_human] ];

	}forEach(list HumanTrg);


	// reselect the element selected before update 
	for [{_x=0}, {_x<(lbSize IdcDdlFollowList)}, {_x=_x+1}] do
	{
		scopeName "reselectLoop";

		 //player globalchat format[" test %1 == %2 , %3 ", _lastDataSelected,lbText[IdcDdlFollowList,_x],_x];
		
		if (lbText[IdcDdlFollowList,_x] == _lastDataSelected) then 
		{
			lbSetCurSel [IdcDdlFollowList, _x];
			//player globalchat "-------EQUAL---------";
			breakOut "reselectLoop";
		};


	 };

	//sleep 1;
};
    